<template>
    <div class="index">
       <!-- 搜索框 -->
    <Search></Search>

<!-- 轮播图 -->
<Swiper></Swiper>

<!-- 列表 -->
<List></List>

<!-- Tabbar -->
<Tabbar></Tabbar>
     
      <!-- 二级路由的占位组件 -->
      <router-view></router-view>
  
      <div class="tabbar">
        
        <router-link to="/index/home">首页</router-link>
        <router-link to="/index/order">订单</router-link>
        <router-link to="/index/mine">我的</router-link>
  
       
      </div>
    </div>
  </template>
  
  <script>
  export default {
    data(){
      return {
        arr:[]
      }
    },
    mounted(){
          this.$router.afterEach((to,from,next)=>{
            window.scroll(0,0)
          })
        }
  }
  </script>
  
  <style lang='scss' scoped>
  .tabbar{
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 10px 0;
    border-top: 1px solid #ccc;
  }
  </style>